package com.taotao.async.task;

import com.taotao.async.task.exception.TaskException;
import com.taotao.async.task.result.TaskResultProccessor;

import java.util.concurrent.ConcurrentHashMap;

public abstract class AbstractTaskEngine implements TaskEngine{

    protected ConcurrentHashMap<Long,TaskExeContext> ctxMap = new ConcurrentHashMap<>();

    protected TaskExecutor taskExecutor;


    public AbstractTaskEngine(TaskExecutor taskExecutor) {
        this.taskExecutor = taskExecutor;
    }

    @Override
    public Long submitTask(Task task, String param) {
        return 0L;
    }

    @Override
    public <T> T waitForTaskResult(Long taskInstId, Class<T> rClass) throws TaskException {



        return null;
    }

    @Override
    public void retryTask(Long taskInstId) {

    }

    @Override
    public void getTaskResult(Long taskInstId, TaskResultProccessor rcb) {

    }
}
